package com.lantosec.hmrp.modules.supplier.vo;

import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.supplier.entity.SupplierBad;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 供应商不良记录 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-02-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SupplierBad对象", description="供应商不良记录")
public class SupplierBadVO extends BaseVO<SupplierBad> {
    private static final long serialVersionUID = 1L;


    public SupplierBadVO(SupplierBad entity){
        this.badId = entity.getBadId();
        this.badType = entity.getBadType();
        this.supplierCode = entity.getSupplierCode();
        this.supplierName = entity.getSupplierName();
        this.uploadId = entity.getUploadId();
        this.linkmanList = entity.getLinkmanList();
        this.badContent = entity.getBadContent();
        this.badDate = entity.getBadDate();
        this.stopFlag = entity.getStopFlag();
        this.blacklistFlag = entity.getBlacklistFlag();
        this.submitFlag = entity.getSubmitFlag();
        this.createTime = entity.getCreateTime();
        this.createUserId = entity.getCreateUserId();
        this.createUser = entity.getCreateUser();
        this.handleTime = entity.getHandleTime();
        this.handleUserId = entity.getHandleUserId();
        this.handleUser = entity.getHandleUser();
        this.handleState = entity.getHandleState();
        this.handleContent = entity.getHandleContent();
    }

    @Override
    public SupplierBad convertToEntity(){
        return new SupplierBad(this);
    }


    @ApiModelProperty(value = "不良记录ID")
    private String badId;

    @ApiModelProperty(value = "不良行为类型，字典表ID")
    private String badType;

    @ApiModelProperty(value = "供应商编码")
    private String supplierCode;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "上传附件ID")
    private String uploadId;

    @ApiModelProperty(value = "不良行为对应的供应商联系人列表")
    private String linkmanList;

    @ApiModelProperty(value = "不良行为内容")
    private String badContent;

    @ApiModelProperty(value = "不良行为发生日期")
    private String badDate;

    @ApiModelProperty(value = "是否暂停采购(0否1是)")
    private Integer stopFlag;

    @ApiModelProperty(value = "是否接入黑名称(0否1是)")
    private Integer blacklistFlag;

    @ApiModelProperty(value = "是否提交上级(0否1是)")
    private Integer submitFlag;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @ApiModelProperty(value = "创建人")
    private String createUser;

    @ApiModelProperty(value = "处置时间")
    private Date handleTime;

    @ApiModelProperty(value = "处置人ID")
    private String handleUserId;

    @ApiModelProperty(value = "处置人")
    private String handleUser;

    @ApiModelProperty(value = "处置状态")
    private String handleState;

    @ApiModelProperty(value = "处置说明")
    private String handleContent;

    @ApiModelProperty(value = "不良行为类型名称")
    private String badTypeName;
    @ApiModelProperty(value = "处置状态名称")
    private String handleStateName;
    @ApiModelProperty(value = "准入状态")
    private String entryState;
    @ApiModelProperty(value = "文件保存路径")
    private List savePath;
}
